Skip to content
GitmoapAPIBeta
Integrateprovider-connections
POST/repositories/{repo_id}/provider-connections

Create a provider connection for a repository

create_repo_connection
  • provider_connection:manage
    A token needs the provider_connection:manage scope: Manage provider connection credentialsGranted by write_api.Every operation this scope unlocks
  • Audited · mutation

    x-gitmoap-audit: {"kind":"audited","arg":"mutation"}

  • Quota · provider connections per scope

    x-gitmoap-quota: {"kind":"enforced","arg":"provider_connections_per_scope"}

Stores, under a name, what a pipeline provider needs to reach an outside service, for use by the repository's pipelines. A connection either holds static credentials, checked against the provider's credentials schema and stored encrypted, or names an identity to assume through OIDC federation, which stores no secret and works only with providers that support it. A connection's name is unique per provider within the repository, and a repository holds a limited number of connections, set by its plan. Answers 501 when this installation has no secret storage configured. Owners of the repository.

Parameters

Path
  • repo_idRepositoryId (string · uuid)Repository id

Request body

application/json
  • nameProviderConnectionName (string)
  • provider_idProviderId (string)
  • auth_modeConnectionAuthModestatic_credentialsoidc_federationoptionalHow the connection authenticates. Defaults to static_credentials.
  • config_overridesobjectoptional
  • credentialsobjectoptionalThe provider's credentials, in the shape its auth_schema describes. Required for static_credentials; refused for oidc_federation.
  • federation_targetOidcFederationTarget or nulloptionalThe federation target. Required for oidc_federation; absent for static_credentials.
    • The OidcFederationTarget schema
    • cloudaws
    • role_arnRoleArn (string)The IAM role the pipeline assumes.
    • audiencestring or nulloptionalThe audience of the identity token. Defaults to sts.amazonaws.com.
    • regionAwsRegion (string) or nulloptionalThe AWS region for the provider's calls.
Request body exampleSynthesized example
{
"name": "payments-api",
"provider_id": "b33e14f9-c4b8-4d1a-80d8-e2c0aaf308db"
}

Responses

201Connection createdapplication/json
  • auth_modeConnectionAuthModestatic_credentialsoidc_federationHow this connection authenticates.
  • created_atstring
  • created_byActorSummary
  • idConnectionId (string · uuid)
  • nameProviderConnectionName (string)
  • provider_idProviderId (string)
  • scope_idstring
  • scope_typeScopeTypegrouprepository
  • secret_refsobjectThe names of the stored credential fields, each with a reference to where it is stored. Never the values. Empty for an oidc_federation connection.
  • config_overridesobjectoptional
  • federation_targetOidcFederationTarget or nulloptionalThe cloud role the connection assumes. Present only when auth_mode is oidc_federation.
    • The OidcFederationTarget schema
    • cloudaws
    • role_arnRoleArn (string)The IAM role the pipeline assumes.
    • audiencestring or nulloptionalThe audience of the identity token. Defaults to sts.amazonaws.com.
    • regionAwsRegion (string) or nulloptionalThe AWS region for the provider's calls.
  • last_rotated_atstring or nulloptional
201 exampleSynthesized example
{
"auth_mode": "static_credentials",
"created_at": "2026-10-10T13:23:47Z",
"created_by": {
"email": "tomas@acme.example",
"id": "id-703b",
"username": "lin",
"avatar_url": "https://gitmoap.example/acme/b1ea260e"
},
"id": "348907a5-27f5-4882-a478-55bff7ddf0ac",
"name": "payments-api",
"provider_id": "de8fbc35-ba48-44c2-a462-26edc720f7da",
"scope_id": "f0eaa2d2-2fca-40b4-8519-6d4b9fe0f20a",
"scope_type": "group",
"secret_refs": {
"secret_refs": "secret-refs-2760"
},
"config_overrides": {},
"federation_target": {
"cloud": "aws",
"role_arn": "role-arn-d486",
"audience": "audience-d239",
"region": "region-cded"
},
"last_rotated_at": "2026-10-08T10:17:33Z"
}
400application/json
Error codes
  • BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-7180",
"message": "Pin a page's payload to the build that rendered it"
}
}
401application/json
Error codes
  • UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-ce0b",
"message": "Draw the region map from operation density"
}
}
403application/json
Error codes
  • FORBIDDENYou are signed in but may not do this here; reason names the permission or the rule that refused it
  • INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs; required_scope names it
  • PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-d283",
"message": "Stream pipeline status into the run header"
}
}
404application/json
Error codes
  • NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
404 exampleSynthesized example
{
"error": {
"code": "code-c9ee",
"message": "Label every synthesized example"
}
}
409application/json
Error codes
  • CONFLICTThe request conflicts with the resource's current state; reason says how
  • LEGAL_ACCEPTANCE_REQUIREDAccept the current Terms of Service before changing anything; reading stays open
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
409 exampleSynthesized example
{
"error": {
"code": "code-f057",
"message": "Inline scalar newtypes but keep their brand"
}
}
422Credentials supplied for an OIDC-federation connectionapplication/json
Error codes
  • UNPROCESSABLE_ENTITYThe request is well-formed but asks for something the resource's rules do not allow; reason says which
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
422 exampleSynthesized example
{
"error": {
"code": "code-4d43",
"message": "Stream pipeline status into the run header"
}
}
429Provider-connection limit reached for this repositoryapplication/json
Error codes
  • TOO_MANY_REQUESTSRetryableA quota, a rate limit or a transfer budget is spent. When the response carries Retry-After, retry after that many seconds
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
429 exampleSynthesized example
{
"error": {
"code": "code-6f26",
"message": "Pin a page's payload to the build that rendered it"
}
}
501Provider connections are not configured on this deploymentapplication/json
Error codes
  • NOT_IMPLEMENTEDThis deployment has not configured the feature the operation needs; the message names it
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
501 exampleSynthesized example
{
"error": {
"code": "code-d976",
"message": "Draw the region map from operation density"
}
}

CLI

gitmoap provider-connections create-repo-connection

  • --repo-ididRepository id (id or owner/repo path)
  • --auth-modestatic_credentials | oidc_federationoptionalHow the connection authenticates. Defaults to `static_credentials`.
  • --config-overridesjsonoptional
  • --credentialsjsonoptionalThe provider's credentials, in the shape its `auth_schema` describes. Required for `static_credentials`; refused for `oidc_federation`.
  • --federation-targetjsonoptional
  • --namestring
  • --provider-idstring

Used in these guides