API ReferenceapiintegrationsPOST /v1/connections/callback

POST /v1/connections/callback

Service: integrations · operationId: (none)

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "provider": {
      "type": "string"
    },
    "code": {
      "type": "string"
    },
    "state": {
      "type": "string"
    },
    "redirectUri": {
      "type": "string",
      "format": "uri"
    }
  },
  "required": [
    "provider",
    "code",
    "state",
    "redirectUri"
  ]
}

Responses

201 Connection created

{
  "type": "object",
  "properties": {
    "connection": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "userId": {
          "type": "string"
        },
        "providerId": {
          "type": "string"
        },
        "providerSlug": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "lastSyncAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "createdAt": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "userId",
        "providerId",
        "providerSlug",
        "status",
        "lastSyncAt",
        "createdAt"
      ]
    }
  },
  "required": [
    "connection"
  ]
}

400 Validation error

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

404 Provider not found

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

500 Internal error

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://integrations.platform.loop.health/v1/connections/callback \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'