> 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/whop.md).

# Whop

## POST /v1/connections/whop/

>

```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_whop_connection_create":{"additionalProperties":false,"properties":{"api_key":{"maxLength":512,"type":"string"},"company_id":{"maxLength":255,"type":"string"}},"required":["api_key","company_id"],"type":"object"},"Output_connection_action":{"properties":{"category":{"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."},"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/whop/":{"post":{"operationId":"post_public_whop_connection","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Input_whop_connection_create"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Output_connection_action"}}},"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":["whop"]}}}}
```

## DELETE /v1/connections/whop/

>

```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"}}},"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."}},"schemas":{"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"}}},"paths":{"/v1/connections/whop/":{"delete":{"operationId":"delete_public_whop_connection","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"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":["whop"]}}}}
```
