Skip to main content
POST
Create one opportunity or import a batch into an inbox’s Kanban boards. Send the same 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. Replace YOUR_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:
The token must have access to the account, inbox, and destination stages. A session login alone does not authorize this endpoint. Stages with an enabled GIA campaign entry action require administrator privileges; AgentBot tokens are treated as administrators for Kanban access.

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.
Updates preserve opportunity fields marked as internally edited. A recognized reimport can also change the stage within the board and unarchive the opportunity. Use Change opportunity stage for stage transitions that apply sale and loss rules.

Validation rules

  • The batch must contain 1 to 100 items.
  • Every item requires external_id, stage_id, and lead.name.
  • Unknown fields are rejected at the top level, in each item, in lead, in opportunity, and in comment entries. The documented free-form objects preserve additional properties.
  • opportunity.title cannot exceed 255 characters.
  • A provided non-null opportunity.value must be a non-negative number.
  • A provided opportunity.currency must 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 return 401, with a different error message.

404 Not Found

The specified inbox is invalid or inaccessible. An invalid or inaccessible destination stage is reported as 422, rather than this inbox error.
Both error examples use this model:

Errors

Example validation error: