0.0.1OAS 3.1

Use the AgentSync Platform API to programmatically retrieve your organization’s
contracts, contract assignments, producers, organizations, tasks and requirement
sets. The Getting started guide published beside this reference covers credentials,
paging, errors and webhooks.

Call https://api.{environment}.agentsync.io/platform, then the operation’s path,
which begins /v1. Every request carries a client-credentials access token issued
to a service account, with the scope the operation names.

Lists are paged: page_size defaults to 50, a value above 200 is lowered to 200
(GET /v1/organizations lowers any value above 50 to 50), and page_token (at
most 1024 bytes) is the previous page’s page.nextToken.
An error carries its code in its first details entry; the ErrorCode schema
lists them. Two responses can carry no code: a 500 can have an empty body or a
message only (treat it as internal_error), and a 429 from the API gateway has a
message only (treat any 429 as “slow down”).

AgentSync can notify your system of changes through webhooks; the
AgentSync event catalog
lists the event types. Freshness is best-effort: a change is normally readable
within a few seconds of its event; if not, retry with backoff for up to about a
minute. Re-read the records you hold periodically to catch anything an event did
not carry.

Version 1 (/v1) only adds things: new operations, optional parameters, response
fields, error codes and enum values. Nothing is removed, renamed or changed in
meaning. Ignore response fields you don’t recognize. If you get an error code or
enum value you don’t recognize, handle it by its HTTP status. Breaking changes are
announced in advance.

API Base URL
  • Server 1:https://api.{environment}.agentsync.io/platform
    Variables
    environment:

    AgentSync API gateway

Security
bearerAuth (http)

An OAuth 2.0 access token for a service account, sent as “Authorization: Bearer ”.

oauth2 (oauth2)

How to get the access token: the client-credentials flow, with the client ID and secret AgentSync issued for your organization. The token host follows the environment, auth..agentsync.io. Request only the scopes your integration needs.

List contracts

Lists the contracts your organization is a party to, in the order AgentSync recorded them. Each contract names the organization on its other side and the buckets and products it covers. Narrow the list with status; send the same status with every page of one listing.

get
https://api.sandbox.agentsync.io/platform/v1/contracts

Query Parameters

statusstring

Only contracts with this status. A value other than active or terminated is a 400.

Allowed values:activeterminated

Example:active

page_sizeinteger

Items per page. Defaults to 50; a value above 200 is clamped to 200. A non-numeric or non-positive value is a 400.

Default:50

>= 1

Example:100

page_tokenstring

Opaque token from a previous response’s page.nextToken. Send it with the same filters as the request that returned it: it is signed for them. A token that is malformed, altered, sent with other filters, or longer than 1024 bytes is a 400.

Example:eyJrIjoiZXhhbXBsZSJ9

Response

application/json

One page of your organization’s contracts.

A page of contracts.

itemsarray[object]required

A contract your organization is a party to: the paper between a carrier and a distribution organization that the carrier’s products are placed under.

Example:{"id":"contract_01h455vb4pex5vsknk084sn02q","name":"Acme Life 2026","code":"ACME-2026","status":"active","provisioningMode":"full_onboarding","counterpartyOrganizationId":"org_01h455vb4pex5vsknk084sn02q","productIds":["product_01h455vb4pex5vsknk084sn02q"],"createdAt":"2026-01-15T17:04:05Z","lastChangedAt":"2026-03-02T09:30:00Z"}

Show Child Parameters
pageobjectrequired

Pagination metadata of a collection response. nextToken is absent on the last page; pass it back as the page_token query parameter to continue.

Example:{"nextToken":"eyJrIjoiZXhhbXBsZSJ9"}

Show Child Parameters
get/v1/contracts
 
application/json

List contract assignments

Lists the contract assignments under the contracts your organization is a party to: each producer placed on one of the contracts’ products. Narrow the list with person_id, org_id, npn, upline_contract_assignment_id and status, alone or together; a filter naming a producer or an assignment your organization cannot see returns an empty page. Send the same filters with every page of one listing: a page_token sent with different filters is a 400.

get
https://api.sandbox.agentsync.io/platform/v1/contract-assignments

Query Parameters

person_idstring

A person’s ID, a TypeID with the prefix person.

Match pattern:^person_[0-7][0-9a-hjkmnp-tv-z]{25}$

Example:person_01h455vb4pex5vsknk084sn02q

org_idstring

An organization’s ID: a TypeID with the prefix org. It never changes, and is the same ID for the organization across the AgentSync API.

Match pattern:^org_[0-7][0-9a-hjkmnp-tv-z]{25}$

Example:org_01h455vb4pex5vsknk084sn02q

npnstring

Only assignments of the person holding this National Producer Number. An NPN no person holds returns an empty page, not an error. A value that is not one to ten digits, or that is zero, is a 400.

Match pattern:^[0-9]{1,10}$

Example:12345678

upline_contract_assignment_idstring

A contract assignment’s ID, a TypeID with the prefix contractassignment.

Match pattern:^contractassignment_[0-7][0-9a-hjkmnp-tv-z]{25}$

Example:contractassignment_01h455vb4pex5vsknk084sn02r

statusstring

Only assignments with this status. A value outside the list is a 400.

Allowed values:activeinactivependingsuspendedterminated

Example:active

page_sizeinteger

Items per page. Defaults to 50; a value above 200 is clamped to 200. A non-numeric or non-positive value is a 400.

Default:50

>= 1

Example:100

page_tokenstring

Opaque token from a previous response’s page.nextToken. Send it with the same filters as the request that returned it: it is signed for them. A token that is malformed, altered, sent with other filters, or longer than 1024 bytes is a 400.

Example:eyJrIjoiZXhhbXBsZSJ9

Response

application/json

One page of the contract assignments under your organization’s contracts.

A page of contract assignments.

itemsarray[object]required

A contract assignment under a contract your organization is a party to: one producer, a person or a firm, placed on one of the contract’s products.

Example:{"id":"contractassignment_01h455vb4pex5vsknk084sn02q","contractId":"contract_01h455vb4pex5vsknk084sn02q","productId":"product_01h455vb4pex5vsknk084sn02q","producerType":"individual","personId":"person_01h455vb4pex5vsknk084sn02q","writingNumber":"W-1001","status":"active","carrierStatus":"active","partnerStatus":"active","effectiveAt":"2026-02-01T00:00:00Z"}

Show Child Parameters
pageobjectrequired

Pagination metadata of a collection response. nextToken is absent on the last page; pass it back as the page_token query parameter to continue.

Example:{"nextToken":"eyJrIjoiZXhhbXBsZSJ9"}

Show Child Parameters
get/v1/contract-assignments
 
application/json