Buckets Leads Status API
The Buckets Leads Status API allows authorized systems to retrieve lead statuses by emaildata for a given bucket and affiliate, using emails and/or client IDs, with optional validationfiltering byand sourceId.flexible response structure.
These endpoints are read-only in intent and are implemented as POST requests to support bulk email validation.lookups.
Swagger documentation
(CRM origin)/api/public/docs/#/Buckets/post_buckets__bucketId___affiliateID__leadsBase Pathpath
/api/public
Authentication
Authentication
Method: Method
Token-based authentication usingvia theAuthorization Authorization header.header
Header Format
Authorization: <API_TOKEN>
-
No
Bearerprefix -
Token
valuemust be passed as-is
API Token Source
API tokens are generated in CRM via:
/security/identification-tokens
Required Permissions
The role attached to the API token must include:
Buckets: View Own
ThisRequired ispermission:
Buckets: theView minimum required permission.Own
Tokens with broader permissions are acceptedTokens without this permission are rejected
Unauthorized Response
If authentication fails:
401 Unauthorized
{
"message": "Access with the provided credentials is incorrect. CODE: X-0005",
"statusCode": 401
}
Common Constraintsconstraints
Max lookup size: 100 (emails | ids |
Client | type: Server-to-server |
EndpointEndpoint: 1 — Get Lead StatusesLeads by Bucketbucket & Affiliateaffiliate
POST /buckets/{bucketId}/{affiliateID}/leads
Description
Returns a mapping of email → lead statusdata for theclients providedidentified listby ofemails emails.and/or client IDs.
Validation
Includes includes:validation:
-
Bucket existence
-
Bucket ownership by affiliate
-
Request size limits
Path Parameters
parameters
| |||
|
Request Headers
headers
| application/json |
|
| <API_TOKEN> |
Request Body
body
{
"emails": ["[email protected]"],
"[email protected]"ids": ["69ce524d741e8f2238329fff"],
"keyBy": "email",
"filters": {
"createdDate": ["1676172330450", "1776172330450"]
}
}
Fields
| emails (optional)
ids — array of client IDs (optional) keyBy — "email" (default) or "id" filters.createdDate — optional date range (epoch ms strings) Notes |
|||
|---|---|---|---|
one of emails | Maximum total: 100 | combined
If keyBy = "id" and ID is missing → email is used as fallback
Successful Responseresponse
200 OK
Response is an object keyed by email or id (based on keyBy).
{
"[email protected]": {
"id": "69ce524d741e8f2238329fff",
"email": "[email protected]",
"affiliateID": "1234567890",
"status": "active",
"[email protected]"createdDate": "inactive"2021-01-01T00:00:00.000Z",
"ftd": "2021-01-01T00:00:00.000Z"
}
}
Returns
Error Responses
Errors
400 Bad Request
Too many emails | |
|
|
|
-
TokenInvalidisor missing token -
Token is invalid Token lacksMissing required permissions
Endpoint
2Endpoint: — Get Lead StatusesLeads by Bucket,bucket, Affiliateaffiliate & Source
source
POST /buckets/{bucketId}/{affiliateID}/leads/{sourceId}
Description
Same as Endpointprevious 1, butendpoint, with an additional source validation step ensuring the provided sourceId belongs to the specified bucket.
step.
Used for source-level access control.control.
Path Parameters
parameters
| |||
| |||
|
Request Body
body
{Same "emails":as ["[email protected]",previous "[email protected]"]endpoint.
}Successful Response
response
200Same OKstructure as previous endpoint.
{
"[email protected]": "active",
"[email protected]": "inactive"
}Error Responses
Errors
400 Bad Request
All errorsprevious from Endpoint 1,errors, plus:
|
Same as previous endpoint.
Example Requestsrequests
Without sourceId
curl -X POST "(CRM origin)/api/public/buckets/<bucketId>/<affiliateID>/leads" \
-H "Content-Type: application/json" \
-H "Authorization: <API_TOKEN>" \
-d '{
"emails": ["[email protected]"],
"[email protected]"ids": ["69ce524d741e8f2238329fff"]
}'
With sourceId
curl -X POST "(CRM origin)/api/public/buckets/<bucketId>/<affiliateID>/leads/<sourceId>" \
-H "Content-Type: application/json" \
-H "Authorization: <API_TOKEN>" \
-d '{
"emails": ["[email protected]","[email protected]"]
}'