> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcargo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Initiate OAuth

> Initiate the OAuth flow for an integration and return a consent URL.



## OpenAPI

````yaml https://api.getcargo.io/openapi.json post /connection/integrations/{slug}/initiateOauth
openapi: 3.1.0
info:
  title: Cargo API
  version: 1.0.0
  description: Cargo Platform API v1
servers:
  - url: https://api.getcargo.io/v1
    description: Cargo API
security:
  - bearerAuth: []
paths:
  /connection/integrations/{slug}/initiateOauth:
    post:
      tags:
        - Connection - Integrations
      summary: Initiate OAuth
      description: Initiate the OAuth flow for an integration and return a consent URL.
      parameters:
        - in: path
          name: slug
          schema:
            type: string
            title: Slug
            description: Integration slug.
          required: true
          description: Integration slug.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  consentUrl:
                    type: string
                    title: Consent URL
                    description: URL to redirect the user to in order to authorize.
                required:
                  - consentUrl
                additionalProperties: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````