Skip to main content
POST
Create an Opportunity

Authorizations

Authorization
string
header
required

A static Affinity API key, presented as a bearer token.

Body

application/json

Request body to create an Opportunity.

name
string
required

The name of the opportunity. It must be unique on the list.

Required string length: 1 - 255
Example:

"Horizon Technologies Upsell $10k"

listId
integer<int64>
required

The ID of the opportunity list that the opportunity is added to.

Required range: 1 <= x <= 9007199254740991
Example:

1

isRestricted
boolean
default:false

Whether to create a restricted opportunity.

Example:

false

Response

Created

Opportunity model.

id
integer<int64>
required

The unique identifier for the opportunity

Required range: 1 <= x <= 9007199254740991
Example:

1

name
string
required

The name of the opportunity. When isRedacted is true, the real name is masked and this value is the literal string [Hidden].

Example:

"Horizon Technologies Upsell $10k"

listId
integer<int64>
required

The ID of the list that the opportunity belongs to

Required range: 1 <= x <= 9007199254740991
Example:

1

listName
string
required

The name of the list that the opportunity belongs to

Example:

"Pipeline Q1 2024"

isRestricted
boolean
required

Whether the opportunity is restricted. false for customers without the Restricted Opportunities feature enabled.

Example:

false

isRedacted
boolean
required

Whether the response is redacted because the requesting user does not have access to this restricted opportunity. The real name is masked as [Hidden] when true. Always false when isRestricted is false.

Example:

false