openapi: 3.0.1 info: title: Netlify Netlify's API documentation accessToken accountMembership API description: 'Netlify is a hosting service for the programmable web. It understands your documents and provides an API to handle atomic deploys of websites, manage form submissions, inject JavaScript snippets, and much more. This is a REST-style API that uses JSON for serialization and OAuth 2 for authentication. This document is an OpenAPI reference for the Netlify API that you can explore. For more detailed instructions for common uses, please visit the [online documentation](https://www.netlify.com/docs/api/). Visit our Community forum to join the conversation about [understanding and using Netlify’s API](https://community.netlify.com/t/common-issue-understanding-and-using-netlifys-api/160). Additionally, we have two API clients for your convenience: - [Go Client](https://github.com/netlify/open-api#go-client) - [JS Client](https://github.com/netlify/build/tree/main/packages/js-client)' termsOfService: https://www.netlify.com/legal/terms-of-use/ version: 2.33.1 x-logo: url: netlify-logo.png href: https://www.netlify.com/docs/ altText: Netlify servers: - url: https://api.netlify.com/api/v1 security: - netlifyAuth: [] tags: - name: accountMembership x-displayName: Accounts paths: /accounts: get: tags: - accountMembership operationId: listAccountsForUser responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/accountMembership' default: description: error content: application/json: schema: $ref: '#/components/schemas/error' post: tags: - accountMembership operationId: createAccount requestBody: content: application/json: schema: $ref: '#/components/schemas/accountSetup' required: true responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/accountMembership' default: description: error content: application/json: schema: $ref: '#/components/schemas/error' x-codegen-request-body-name: accountSetup /accounts/{account_id}: get: tags: - accountMembership operationId: getAccount parameters: - name: account_id in: path required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/accountMembership' default: description: error content: application/json: schema: $ref: '#/components/schemas/error' put: tags: - accountMembership operationId: updateAccount parameters: - name: account_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/accountUpdateSetup' required: false responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/accountMembership' default: description: error content: application/json: schema: $ref: '#/components/schemas/error' x-codegen-request-body-name: accountUpdateSetup delete: tags: - accountMembership operationId: cancelAccount parameters: - name: account_id in: path required: true schema: type: string responses: '204': description: Not Content content: {} default: description: error content: application/json: schema: $ref: '#/components/schemas/error' components: schemas: accountUsageCapability: type: object properties: included: type: integer used: type: integer accountUpdateSetup: type: object properties: name: type: string slug: type: string type_id: type: string extra_seats_block: type: integer billing_name: type: string billing_email: type: string billing_details: type: string accountMembership: type: object properties: id: type: string name: type: string slug: type: string type: type: string capabilities: type: object properties: sites: $ref: '#/components/schemas/accountUsageCapability' collaborators: $ref: '#/components/schemas/accountUsageCapability' billing_name: type: string billing_email: type: string billing_details: type: string billing_period: type: string payment_method_id: type: string type_name: type: string type_id: type: string owner_ids: type: array items: type: string roles_allowed: type: array items: type: string created_at: type: string format: dateTime updated_at: type: string format: dateTime error: required: - message type: object properties: code: type: integer format: int64 message: type: string nullable: false accountSetup: required: - name - type_id type: object properties: name: type: string type_id: type: string payment_method_id: type: string period: type: string enum: - monthly - yearly extra_seats_block: type: integer securitySchemes: netlifyAuth: type: oauth2 flows: implicit: authorizationUrl: https://app.netlify.com/authorize scopes: {} externalDocs: description: Online documentation url: https://www.netlify.com/docs/api/ x-tagGroups: - name: OAuth tags: - ticket - accessToken - name: User accounts tags: - user - accountMembership - member - accountType - paymentMethod - auditLog - name: Site tags: - site - environmentVariables - file - metadata - purge - snippet - name: Domain names tags: - dnsZone - sniCertificate - name: Deploys tags: - deploy - deployedBranch - deployKey - name: Builds tags: - build - buildLogMsg - name: Dev servers tags: - devServer - name: Webhooks and notifications tags: - hook - hookType - buildHook - devServerHook - name: Services tags: - service - serviceInstance - name: Functions tags: - function - name: Forms tags: - form - submission - name: Split tests tags: - splitTest - name: Large media tags: - asset - assetPublicSignature x-original-swagger-version: '2.0'