Opportunities
Create an opportunity
Creates an opportunity on the authenticated team and returns it. A title already used on the team answers conflict without creating anything.
posthttps://api.govdash.us/v1/opportunities
Authorization
Your API key as a bearer token, for example Bearer gd_live_....
See Authentication for how to create a key.
Headers
The dated API version this request is written against. Responses keep that version's shape after newer versions ship.
One of:
Body
application/jsonOpportunity name, unique within the team.
Data classification of the opportunity. Values above the token's classification ceiling are forbidden.
One of:
Team that will own the opportunity. Defaults to, and must be, the authenticated team.
Opportunity description.
Phase identifier from GET /v1/meta/phases. It must be a phase of the authenticated team. Defaults to the team's first active phase.
Solicitation number.
Identifier of an agency, from GET /v1/agencies.
Estimated contract value in US dollars.
Response due date.
When the notice was posted.
Link to the opportunity at its source.
Response
201 · application/jsonAn opportunity the team is tracking.
Opportunity identifier.
Object type, always opportunity.
Team that owns the opportunity.
When the opportunity was created.
When the opportunity was last updated.
Opportunity name.
Opportunity description.
Show child attributesHide child attributes
Phase identifier.
Phase name.
Solicitation number.
Identifier of the issuing agency.
Estimated contract value in US dollars.
Response due date.
When the notice was posted.
Link to the opportunity at its source.
Data classification of the opportunity.
One of:
Custom field values set on the opportunity. Present only with expand[]=custom_fields.
Show child attributesHide child attributes
Custom field identifier.
Custom field name.
Custom field type, which determines the shape of value.
One of:
Value set on the opportunity.
Capture team members. Present only with expand[]=members.
Show child attributesHide child attributes
Member assignment identifier.
Show child attributesHide child attributes
Member role identifier.
Member role name.
Team user assigned to the role.
Show child attributesHide child attributes
User identifier.
User first name.
User last name.
User email address.
Identifier of the key person assigned to the role.
Errors
Every error returns a stable error.code to branch on and an error.message that says what went wrong, like the examples below. See Errors for how to handle each one.
The body is missing a required field, has one this endpoint doesn't accept, or a field has the wrong type. The message names the field.
Invalid request body: Missing key at ["title"]
The key's service account doesn't have the permission this needs, or your team's access has ended.
You do not have permission to perform this action.
The record doesn't exist, belongs to another team, or is above the key's classification.
The requested resource was not found.
A record like this already exists. Use it instead of creating another.
An opportunity with this title already exists.
The request is well formed, but GovDash won't make this change. The message says why, when it can.
The request failed validation.
You sent too many requests. Wait the seconds in the retry-after header, then retry.
This access token exceeded its write rate limit.
Something went wrong on GovDash's side, usually a bug. Retry with backoff, and check before retrying a create.
An unexpected error occurred.
GovDash is briefly unavailable and didn't run the request. Retry after retry-after.
The service is temporarily unavailable. Try again later.