> For the complete documentation index, see [llms.txt](https://docs.themochi.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.themochi.app/api-reference/connections.md).

# Connections

## GET /v1/connections/

>

```json
{"openapi":"3.0.3","info":{"title":"Mochi Public API","version":"1.0.0"},"servers":[{"description":"Production","url":"https://api.themochi.app"}],"security":[{"BearerAuth":[]},{"PublicApiOAuth":["config:read"]}],"components":{"securitySchemes":{"BearerAuth":{"scheme":"bearer","type":"http"},"PublicApiOAuth":{"flows":{"authorizationCode":{"authorizationUrl":"https://api.themochi.app/api/zapier/oauth/authorize/","scopes":{"analytics:read":"Access analytics:read","automations:write":"Access automations:write","bookings:read":"Access bookings:read","config:read":"Access config:read","config:write":"Access config:write","content:write":"Access content:write","leads:read":"Access leads:read","leads:write":"Access leads:write","links:write":"Access links:write","messages:send":"Access messages:send","revenue:read":"Access revenue:read","signals:read":"Access signals:read","team:read":"Access team:read"},"tokenUrl":"https://api.themochi.app/api/zapier/oauth/token/"}},"type":"oauth2"}},"schemas":{"Output_connections":{"properties":{"account_label":{"nullable":true,"readOnly":true,"type":"string"},"category":{"readOnly":true,"type":"string"},"connected_at":{"format":"date-time","nullable":true,"readOnly":true,"type":"string"},"id":{"readOnly":true,"type":"string"},"provider":{"readOnly":true,"type":"string"},"status":{"readOnly":true,"type":"string"}},"type":"object"},"PublicApiErrorEnvelope":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"fields":{"additionalProperties":true,"type":"object"},"message":{"type":"string"},"request_id":{"type":"string"},"retry_after":{"minimum":0,"type":"integer"},"type":{"type":"string"}},"required":["type","message","request_id"],"type":"object"}},"required":["error"],"type":"object"}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The request is invalid."},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"Authentication is missing, invalid, or revoked."},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The authenticated identity lacks the required scope or capability."},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The resource is unavailable or not visible to this organization."},"TooManyRequests":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The request-rate budget is exhausted."}}},"paths":{"/v1/connections/":{"get":{"operationId":"get_public_connections_list","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Output_connections"},"type":"array"},"next_cursor":{"nullable":true,"type":"string"}},"required":["data","next_cursor"],"type":"object"}}},"description":"Success"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"tags":["connections"]}}}}
```

## POST /v1/connections/

>

```json
{"openapi":"3.0.3","info":{"title":"Mochi Public API","version":"1.0.0"},"servers":[{"description":"Production","url":"https://api.themochi.app"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"scheme":"bearer","type":"http"}},"parameters":{"IdempotencyKey":{"description":"UUID4 identifying one intended write. Reuse it only when retrying that same write.","in":"header","name":"Idempotency-Key","required":true,"schema":{"format":"uuid","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$","type":"string"}}},"schemas":{"Input_connection_create":{"additionalProperties":false,"properties":{"provider":{"enum":["calendly"],"type":"string"}},"required":["provider"],"type":"object"},"Output_connection_oauth_start":{"properties":{"connect_url":{"readOnly":true,"type":"string"},"expires_at":{"format":"date-time","readOnly":true,"type":"string"},"provider":{"readOnly":true,"type":"string"}},"type":"object"},"PublicApiErrorEnvelope":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"fields":{"additionalProperties":true,"type":"object"},"message":{"type":"string"},"request_id":{"type":"string"},"retry_after":{"minimum":0,"type":"integer"},"type":{"type":"string"}},"required":["type","message","request_id"],"type":"object"}},"required":["error"],"type":"object"}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The request is invalid."},"Unauthorized":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"Authentication is missing, invalid, or revoked."},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The authenticated identity lacks the required scope or capability."},"NotFound":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The resource is unavailable or not visible to this organization."},"Conflict":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The write conflicts with current state or an identical request is still running."},"UnprocessableEntity":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The write contains fields outside its closed input schema."},"TooManyRequests":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicApiErrorEnvelope"}}},"description":"The request-rate budget is exhausted."}}},"paths":{"/v1/connections/":{"post":{"operationId":"post_public_connections_list","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Input_connection_create"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Output_connection_oauth_start"}}},"description":"Success"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"tags":["connections"]}}}}
```
