Skip to content

Save a connection and its instances atomically

POST
/v1/integrations/{provider}/save
curl --request POST \
--url https://api.adversarial.com/api/v1/integrations/example/save \
--header 'Content-Type: application/json' \
--data '{ "connection": { "auth_method": null, "credentials": {}, "display_name": null, "settings": {} }, "connection_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "instances": [ { "capability": "RISK_REGISTER", "config": {}, "display_name": "example", "enabled": true, "instance_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ] }'

Creates a connection when its identifier is omitted. Existing configurations are replaced by identifier; unlisted configurations remain. If any validation or write fails, none of the requested changes persist.

provider
required
string

Provider slug

Media typeapplication/json

Save a connection and its instances atomically.

object
connection
One of:

Connection changes. Creation requires name, authentication method, settings, and credentials. Omit for an instance-only save.

object
auth_method
One of:

Replacement authentication method. Supply credentials in the same request.

string
Allowed values: api_key basic bearer oauth2_client_credentials
credentials

Complete write-only credential replacement.

object
display_name

Replacement connection name.

string | null
settings

Replacement non-secret connection values.

object
connection_id

Existing connection to update. Omit to create a connection.

string | null format: uuid
instances

Instances to create or replace. Unlisted instances are retained.

Array<object>

One complete instance in an atomic save.

object
capability
required

Capability selected from the provider catalog. Must match an existing instance.

string
Allowed values: RISK_REGISTER INCIDENT_REGISTER RISK_TICKET INCIDENT_TICKET NOTIFICATION AGENT_CONTEXT
config

Complete configuration value. Omitted means an empty configuration.

object
display_name
required

Instance name, unique across the organization ignoring case.

string
enabled
required

Whether this configuration can execute.

boolean
instance_id

Existing instance to replace. Omit to create an instance.

string | null format: uuid

Saved connection with all instances

Media typeapplication/json

One installed provider connection.

object
auth_error

Safe authentication error, cleared after successful recovery.

string | null
auth_failed_at

Time of the most recent authentication failure.

string | null format: date-time
auth_failure_count
required

Sequential authentication failures since the last accepted provider request.

integer format: int32
auth_method
required

Selected authentication method.

string
Allowed values: api_key basic bearer oauth2_client_credentials
created_date
required

Creation time.

string format: date-time
credentials_set
required

Whether encrypted credentials are present.

boolean
display_name
required

Operator-chosen connection name, unique per organization and provider.

string
id
required

Connection identifier.

string format: uuid
instances
required

Instances owned by this connection.

Array<object>

One instance under a connection.

object
capability
required

Capability identifier.

string
Allowed values: RISK_REGISTER INCIDENT_REGISTER RISK_TICKET INCIDENT_TICKET NOTIFICATION AGENT_CONTEXT
config
required

Complete validated configuration value.

object
connection_id
required

Connection whose credential this configuration runs with.

string format: uuid
created_date
required

Creation time.

string format: date-time
display_name
required

Instance name, unique across the organization ignoring case; the two halves of a ticket card share one. The instance’s integration user carries it, so it is what Opened by shows for imported records.

string
enabled
required

Whether the platform can execute this configuration.

boolean
id
required

Configuration identifier.

string format: uuid
integration_user
required

Service account this configuration acts as, named as the configuration. Both halves of a ticket card share one.

string format: uuid
updated_date
required

Last update time.

string format: date-time
provider
required

Canonical provider identifier.

string
settings
required

Non-secret connection values.

object
status
required

Current lifecycle status.

string
updated_date
required

Last update time.

string format: date-time

Example

{
"auth_method": "api_key",
"instances": [
{
"capability": "RISK_REGISTER"
}
]
}

Invalid connection or instance

Unknown provider, connection, or configuration

Concurrent change or a name already in use