opportunities

Operations about opportunities

Get all Opportunities

Paginate through Opportunities in Affinity. Returns basic information but not field data on each Opportunity.

To access field data on Opportunities, use the /lists/{list_id}/list-entries or the /v2/lists/{list_id}/saved-views/{view_id}/list-entries GET endpoint.

Requires the "Export data from Lists" permission.

SecuritybearerAuth
Request
query Parameters
cursor
string

Cursor for the next or previous page

Example: cursor=ICAgICAgYmVmb3JlOjo6Nw
limit
integer <int32> [ 1 .. 100 ]
Default: 100

Number of items to include in the page

Example: limit=100
ids
Array of integers <int64>

Opportunity IDs

Example: ids=1&ids=2
Responses
200

OK

Response Headers
X-Ratelimit-Limit-User
integer

Number of requests allowed per minute for the user

X-Ratelimit-Limit-User-Remaining
integer

Number of requests remaining for the user

X-Ratelimit-Limit-User-Reset
integer

Time in seconds before the limit resets for the user

X-Ratelimit-Limit-Org
integer

Number of requests allowed per month for the account

X-Ratelimit-Limit-Org-Remaining
integer

Number of requests remaining for the account

X-Ratelimit-Limit-Org-Reset
integer

Time in seconds before the limit resets for the account

Response Schema: application/json
required
Array of objects (Opportunity) <= 100 items

A page of Opportunity results

Array (<= 100 items)
id
required
integer <int64> [ 1 .. 9007199254740991 ]

The unique identifier for the opportunity

name
required
string

The name of the opportunity

listId
required
integer <int64> [ 1 .. 9007199254740991 ]

The ID of the list that the opportunity belongs to

required
object (Pagination)
prevUrl
string or null <uri>

URL for the previous page

nextUrl
string or null <uri>

URL for the next page

400

Bad Request

403

Forbidden

404

Not Found

default

Errors

get/v2/opportunities
Request samples
Response samples
application/json
{}

Get a single Opportunity

Returns basic information but not field data on the requested Opportunity.

To access field data on Opportunities, use the /lists/{list_id}/list-entries or the /v2/lists/{list_id}/saved-views/{view_id}/list-entries GET endpoint.

Requires the "Export data from Lists" permission.

SecuritybearerAuth
Request
path Parameters
opportunityId
required
integer <int64> [ 1 .. 9223372036854776000 ]

Opportunity ID

Responses
200

OK

Response Headers
X-Ratelimit-Limit-User
integer

Number of requests allowed per minute for the user

X-Ratelimit-Limit-User-Remaining
integer

Number of requests remaining for the user

X-Ratelimit-Limit-User-Reset
integer

Time in seconds before the limit resets for the user

X-Ratelimit-Limit-Org
integer

Number of requests allowed per month for the account

X-Ratelimit-Limit-Org-Remaining
integer

Number of requests remaining for the account

X-Ratelimit-Limit-Org-Reset
integer

Time in seconds before the limit resets for the account

Response Schema: application/json
id
required
integer <int64> [ 1 .. 9007199254740991 ]

The unique identifier for the opportunity

name
required
string

The name of the opportunity

listId
required
integer <int64> [ 1 .. 9007199254740991 ]

The ID of the list that the opportunity belongs to

400

Bad Request

403

Forbidden

404

Not Found

default

Errors

get/v2/opportunities/{opportunityId}
Request samples
Response samples
application/json
{
  • "listId": 1,
  • "name": "Acme Upsell $10k",
  • "id": 1
}

Get Notes for an Opportunity

⚠️ This endpoint is currently in BETA

Returns Notes for a given Opportunity which includes directly attached notes and those attached to persons on this Opportunity.

You can filter notes using the filter query parameter. The filter parameter is a string that you can specify conditions based on the following properties.

Property Name Description Type Allowed Operators Examples
creator.id Filter notes by the creator of the note int32 = creator.id=1
createdAt Filter notes by when it was created datetime >, <, >=, <= createdAt<2025-02-04T10:48:24Z
updatedAt Filter notes by when it was updated datetime >, <, >=, <= updatedAt>=2025-02-03T10:48:24Z
SecuritybearerAuth
Request
path Parameters
opportunityId
required
integer <int64> [ 1 .. 9223372036854776000 ]

Opportunity ID

query Parameters
filter
string

Filter options

cursor
string

Cursor for the next or previous page

limit
integer <int32> [ 0 .. 100 ]
Default: 20

Number of items to include in the page

totalCount
boolean
Default: false

Include total count of the collection in the pagination response

Responses
200

OK

Response Headers
X-Ratelimit-Limit-User
integer

Number of requests allowed per minute for the user

X-Ratelimit-Limit-User-Remaining
integer

Number of requests remaining for the user

X-Ratelimit-Limit-User-Reset
integer

Time in seconds before the limit resets for the user

X-Ratelimit-Limit-Org
integer

Number of requests allowed per month for the account

X-Ratelimit-Limit-Org-Remaining
integer

Number of requests remaining for the account

X-Ratelimit-Limit-Org-Reset
integer

Time in seconds before the limit resets for the account

Response Schema: application/json
required
Array of any (notes.Note) <= 100 items

A page of Note objects

Array (<= 100 items)
type
required
string

The type of the note

Value: "entities"
repliesCount
integer <int32> [ 0 .. 2147483647 ]

The number of replies to this note. This is only included if the repliesCount parameter is passed in the includes in the request and the note is not a reply itself.

object (notes.PermissionSettings)

The permission settings of a note

object (notes.OpportunitiesPreview)

A preview for attached Opportunities on a Note

object (notes.PersonsPreview)

A preview for attached Persons on a Note

object (notes.CompaniesPreview)

A preview for attached Companies on a Note

id
required
integer <int32> [ 1 .. 2147483647 ]

The id of the note

required
object (notes.Content)

A note content

required
object (PersonData)
required
Array of any (notes.Mention) <= 100 items

The mentions in the note

createdAt
required
string <date-time>

The date and time the note was created

updatedAt
required
string or null <date-time>

The date and time the note was last updated

required
object (PaginationWithTotalCount)
totalCount
integer <int64> [ 0 .. 9007199254740991 ]

The total count of the collection. Only included if requested via the totalCount query string parameter.

prevUrl
string or null <uri>

URL for the previous page

nextUrl
string or null <uri>

URL for the next page

400

Bad Request

404

Not Found

default

Errors

get/v2/opportunities/{opportunityId}/notes
Request samples
Response samples
application/json
{
  • "data": [
    ],
}