LaraCopilot
LaraCopilot
API ReferenceEndpointsDeploymentConnections

Connect deployment provider

Stores a deployment provider account credential for an external user. Validates the token against the provider before persisting.

POST
/deployments/{provider}/connections
AuthorizationBearer <token>

In: header

Path Parameters

provider*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://builder.laracopilot.com/api/v1/deployments/string/connections" \  -H "Content-Type: application/json" \  -d '{    "external_user_id": "string",    "token": "stringstri"  }'
{
  "success": true,
  "message": "string",
  "data": {
    "id": 0,
    "provider": "string",
    "provider_name": "string",
    "external_user_id": "string",
    "provider_account_id": "string",
    "provider_account_name": "string",
    "provider_account_email": "string",
    "expires_at": "string",
    "last_used_at": "string",
    "connected_at": "string",
    "updated_at": "string",
    "metadata": {
      "slug": null
    }
  },
  "errors": null
}
{
  "success": true,
  "message": "Deployment provider not found.",
  "data": null,
  "errors": null
}
{
  "success": true,
  "message": "This deployment provider account is already connected to another external user for this agency.",
  "data": null,
  "errors": null
}
{
  "message": "string",
  "errors": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  }
}
{
  "success": true,
  "message": "string",
  "data": null,
  "errors": null
}