Opportunities APIs
Create opportunities
Create or update one opportunity or a batch of up to 100 opportunities.
POST
opportunities array for both operations, with one item for an individual request or up to 100 items for a batch.
cURL examples
The request panel includes complete commands for single-opportunity and batch imports. ReplaceYOUR_API_ACCESS_TOKEN, account ID 10, inbox ID 25, and stage IDs with values from your account. Stage IDs identify Kanban columns.
The cURL commands use Bash syntax. --include prints the HTTP status and response headers along with the JSON body.
Authentication
Send a user or AgentBot API access token in the request header:Path parameters
Common fields
Each item in
opportunities accepts:
Send
origin at the top level, rather than inside individual items.
Lead fields
Contacts are matched by normalized phone number or case-insensitive email. If neither matches, a contact is created. If phone and email match different contacts, a new contact is created without those identifiers and a conflict is recorded. Existing contact names and identifiers are preserved.
Opportunity fields
Product and service resolution follows the board’s catalog settings. Restricted boards require matching active catalog items; boards configured to register imported items can create or reactivate items. When
value is omitted, an available service or product catalog value may be applied.
Create one opportunity
Minimum payload:Create a batch
Updates and retries
An existing import is identified by account, Kanban board, provider,origin, and external_id. Sending the same identity updates the existing opportunity instead of creating another one. Changing boards or origin creates a separate import identity.
Keep
origin stable when retrying requests. If omitted, a new timestamp-based origin is generated for each request, so repeated requests can create additional opportunities.Validation rules
- The batch must contain 1 to 100 items.
- Every item requires
external_id,stage_id, andlead.name. - Unknown fields are rejected at the top level, in each item, in
lead, inopportunity, and in comment entries. The documented free-form objects preserve additional properties. opportunity.titlecannot exceed 255 characters.- A provided non-null
opportunity.valuemust be a non-negative number. - A provided
opportunity.currencymust contain exactly three uppercase letters. - The batch is processed in a single transaction. If an item fails, the batch’s database changes are rolled back.
Response models
201 Created
Returns 201 Created for successful requests, including requests that update existing imports. Example for a single new opportunity:opportunity is created or updated. contact can be created, matched, already_linked, or conflict. index is the zero-based position in the submitted array. Catalog resolution may also return product or service objects with id and status (matched, created, or reactivated). Store opportunity_id to use the stage-change endpoint.
401 Unauthorized
The API access token is missing or invalid. Account access failures and suspended accounts can also return401, with a different error message.
404 Not Found
The specified inbox is invalid or inaccessible. An invalid or inaccessible destination stage is reported as422, rather than this inbox error.
Errors
Example validation error: