{"components":{"schemas":{"Error":{"properties":{"error":{"type":"string"},"retry_after":{"type":"integer"}},"required":["error"],"type":"object"},"OwnedPaste":{"allOf":[{"$ref":"#/components/schemas/PublicPaste"},{"properties":{"burn_after_read":{"type":"boolean"},"category":{"type":"string"},"encrypted":{"type":"boolean"},"folder_id":{"type":["integer","null"]},"max_views":{"type":["integer","null"]},"tags":{"type":"string"},"updated_at":{"format":"date-time","type":["string","null"]},"url":{"format":"uri","type":"string"},"views":{"type":"integer"}},"type":"object"}]},"PasteCreate":{"additionalProperties":false,"properties":{"burn_after_read":{"default":false,"type":"boolean"},"category":{"enum":["code","logs","configuration","data","documentation","other"],"type":"string"},"content":{"description":"Text limited to 1 MB after UTF-8 encoding.","minLength":1,"type":"string"},"encrypted":{"default":false,"description":"Content must already be ciphertext when true.","type":"boolean"},"expiration":{"default":"1w","enum":["10m","1h","1d","1w","2w","1m","6m","1y","never"],"type":"string"},"folder_id":{"type":["integer","null"]},"language":{"default":"plaintext","type":"string"},"max_views":{"description":"Optional maximum number of counted unique views.","maximum":1000,"minimum":1,"type":["integer","null"]},"password":{"maxLength":128,"minLength":4,"type":"string"},"tags":{"description":"Comma- or space-separated tags; at most eight are retained.","type":"string"},"title":{"maxLength":120,"type":"string"},"visibility":{"default":"unlisted","enum":["public","unlisted","private"],"type":"string"}},"required":["content"],"type":"object"},"PasteCreated":{"properties":{"delete_token":{"type":"string"},"expires_at":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"max_views":{"type":["integer","null"]},"raw_url":{"format":"uri","type":["string","null"]},"url":{"format":"uri","type":"string"}},"required":["id","url","delete_token"],"type":"object"},"PasteUpdate":{"additionalProperties":false,"properties":{"category":{"enum":["code","logs","configuration","data","documentation","other"],"type":"string"},"content":{"description":"Text limited to 1 MB after UTF-8 encoding.","minLength":1,"type":"string"},"expiration":{"enum":["10m","1h","1d","1w","2w","1m","6m","1y","never"],"type":"string"},"folder_id":{"type":["integer","null"]},"language":{"type":"string"},"max_views":{"maximum":1000,"minimum":1,"type":["integer","null"]},"password":{"maxLength":128,"minLength":4,"type":"string"},"remove_password":{"type":"boolean"},"tags":{"type":"string"},"title":{"maxLength":120,"type":"string"},"visibility":{"enum":["public","unlisted","private"],"type":"string"}},"type":"object"},"PublicPaste":{"properties":{"content":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"expires_at":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"language":{"type":"string"},"max_views":{"maximum":1000,"minimum":1,"type":["integer","null"]},"title":{"type":"string"},"views":{"minimum":0,"type":"integer"},"visibility":{"type":"string"}},"required":["id","title","content","language","visibility","views"],"type":"object"}},"securitySchemes":{"BearerAuth":{"bearerFormat":"pba account token","scheme":"bearer","type":"http"},"DeleteToken":{"in":"header","name":"X-Delete-Token","type":"apiKey"}}},"externalDocs":{"description":"Human-readable API documentation","url":"https://pastebin.ai/api-docs"},"info":{"contact":{"email":"hello@pastebin.ai","name":"Pastebin.ai API support","url":"https://pastebin.ai/contact"},"description":"Version 1 provides anonymous paste creation and eligible retrieval plus bearer-authenticated management of owned pastes.","summary":"Create and manage Pastebin.ai text pastes.","termsOfService":"https://pastebin.ai/terms","title":"Pastebin.ai API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/api/v1/account/pastes":{"get":{"operationId":"listOwnedPastes","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"pastes":{"items":{"$ref":"#/components/schemas/OwnedPaste"},"type":"array"}},"required":["pastes"],"type":"object"}}},"description":"Owned paste list"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request failed"}},"security":[{"BearerAuth":[]}],"summary":"List up to 100 owned pastes","tags":["Owned pastes"]}},"/api/v1/account/pastes/{paste_id}":{"delete":{"operationId":"deleteOwnedPaste","responses":{"204":{"description":"Paste deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request failed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request failed"}},"security":[{"BearerAuth":[]}],"summary":"Delete an owned paste","tags":["Owned pastes"]},"get":{"operationId":"getOwnedPaste","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnedPaste"}}},"description":"Owned paste"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request failed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request failed"}},"security":[{"BearerAuth":[]}],"summary":"Retrieve an owned paste","tags":["Owned pastes"]},"parameters":[{"description":"Random paste identifier returned by the create endpoint.","in":"path","name":"paste_id","required":true,"schema":{"type":"string"}}],"patch":{"operationId":"updateOwnedPaste","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasteUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnedPaste"}}},"description":"Updated paste"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request failed"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request failed"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request failed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request failed"}},"security":[{"BearerAuth":[]}],"summary":"Update an owned paste","tags":["Owned pastes"]}},"/api/v1/pastes":{"post":{"description":"Creates an anonymous paste or an owned paste when a valid bearer token is supplied.","operationId":"createPaste","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasteCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasteCreated"}}},"description":"Paste created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request failed"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request failed"}},"summary":"Create a paste","tags":["Anonymous pastes"]}},"/api/v1/pastes/{paste_id}":{"delete":{"operationId":"deleteAnonymousPaste","responses":{"204":{"description":"Paste deleted"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request failed"}},"security":[{"DeleteToken":[]}],"summary":"Delete an anonymous paste","tags":["Anonymous pastes"]},"get":{"description":"Returns available public or unlisted content. Private, password-protected, and encrypted pastes are unavailable.","operationId":"getPaste","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPaste"}}},"description":"Paste content"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request failed"}},"summary":"Retrieve eligible paste content","tags":["Anonymous pastes"]},"parameters":[{"description":"Random paste identifier returned by the create endpoint.","in":"path","name":"paste_id","required":true,"schema":{"type":"string"}}]}},"servers":[{"description":"Pastebin.ai production API","url":"https://pastebin.ai"}],"tags":[{"description":"Create, retrieve, and delete eligible anonymous pastes.","name":"Anonymous pastes"},{"description":"Manage pastes owned by the bearer token account.","name":"Owned pastes"}]}
