# Delete profile Delete a profile. A deleted profile and its related credentials can no longer be used for accepting payments. > 🔑 Access with > > [Organization access token with **profiles.write**](/reference/authentication) > > [OAuth access with **profiles.write**](/reference/authentication) # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Mollie Connect", "version": "1.0.0", "license": { "name": "Attribution-NonCommercial-ShareAlike 4.0 International", "identifier": "CC-BY-NC-SA-4.0" } }, "servers": [ { "url": "https://api.mollie.com" } ], "security": [ { "apiKey": [] }, { "organizationAccessToken": [] }, { "oAuth": [] } ], "paths": { "/v2/profiles/{profileId}": { "parameters": [ { "name": "profileId", "description": "Provide the ID of the related profile.", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^pfl_.+$", "example": "pfl_5B8cwPMGnU", "description": "The identifier referring to the [profile](get-profile) this entity belongs to.\n\nMost API credentials are linked to a single profile. In these cases the `profileId` can be omitted in the creation request. For organization-level credentials such as OAuth access tokens however, the `profileId` parameter is required." } } ], "delete": { "summary": "Delete profile", "x-speakeasy-name-override": "delete", "tags": [ "Profiles API" ], "operationId": "delete-profile", "security": [ { "organizationAccessToken": [ "profiles.write" ] }, { "oAuth": [ "profiles.write" ] } ], "description": "Delete a profile. A deleted profile and its related credentials can no longer be used for accepting payments.\n\n> 🔑 Access with\n>\n> [Organization access token with **profiles.write**](/reference/authentication)\n>\n> [OAuth access with **profiles.write**](/reference/authentication)", "responses": { "204": { "description": "An empty response.", "content": { "application/hal+json": { "schema": {}, "example": {} } } }, "404": { "description": "No entity with this ID exists.", "content": { "application/hal+json": { "schema": { "type": "object", "description": "An error response object.", "required": [ "status", "title", "detail", "_links" ], "properties": { "status": { "type": "integer", "description": "The status code of the error message. This is always the same code as the status code of the HTTP message itself.", "minimum": 400, "maximum": 599, "example": 404 }, "title": { "type": "string", "description": "The HTTP reason phrase of the error. For example, for a `404` error, the `title` will be `Not Found`.", "example": "Not Found" }, "detail": { "type": "string", "description": "A detailed human-readable description of the error that occurred.", "example": "The resource does not exist" }, "field": { "type": "string", "description": "If the error was caused by a value provided by you in a specific field, the `field` property will contain the name of the field that caused the issue.", "example": "description" }, "_links": { "type": "object", "required": [ "documentation" ], "properties": { "documentation": { "type": "object", "description": "The URL to the generic Mollie API error handling guide.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "example": "https://docs.mollie.com/errors" }, "type": { "type": "string", "example": "text/html" } } } } } } }, "example": { "status": 404, "title": "Not Found", "detail": "No entity exists with token 'uct_abcDEFghij123456789'", "_links": { "documentation": { "href": "...", "type": "text/html" } } } } } }, "410": { "description": "The requested resource is no longer available. The profile associated with the ID has been deleted and cannot be accessed.", "content": { "application/hal+json": { "schema": { "type": "object", "description": "An error response object.", "required": [ "status", "title", "detail", "_links" ], "properties": { "status": { "type": "integer", "description": "The status code of the error message. This is always the same code as the status code of the HTTP message itself.", "minimum": 400, "maximum": 599, "example": 404 }, "title": { "type": "string", "description": "The HTTP reason phrase of the error. For example, for a `404` error, the `title` will be `Not Found`.", "example": "Not Found" }, "detail": { "type": "string", "description": "A detailed human-readable description of the error that occurred.", "example": "The resource does not exist" }, "field": { "type": "string", "description": "If the error was caused by a value provided by you in a specific field, the `field` property will contain the name of the field that caused the issue.", "example": "description" }, "_links": { "type": "object", "required": [ "documentation" ], "properties": { "documentation": { "type": "object", "description": "The URL to the generic Mollie API error handling guide.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "example": "https://docs.mollie.com/errors" }, "type": { "type": "string", "example": "text/html" } } } } } } }, "example": { "status": 410, "title": "Gone", "detail": "Profile with token pfl_QkEhN94Ba has been deleted.", "_links": { "documentation": { "href": "...", "type": "text/html" } } } } } } }, "x-readme": { "code-samples": [ { "language": "shell", "code": "curl -X DELETE https://api.mollie.com/v2/profiles/pfl_QkEhN94Ba \\\n -H \"Authorization: Bearer access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ\"" }, { "language": "php", "code": "setAccessToken(\"access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ\");\n\n$mollie->send(new DeleteProfileRequest(\"pfl_QkEhN94Ba\"));", "install": "composer require mollie/mollie-api-php" }, { "language": "node", "code": "const { createMollieClient } = require('@mollie/api-client');\nconst mollieClient = createMollieClient({ accessToken: 'access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ' });\n\nconst profile = await mollieClient.profiles.delete('pfl_QkEhN94Ba');", "install": "npm install @mollie/api-client" }, { "language": "python", "code": "from mollie.api.client import Client\n\nmollie_client = Client()\nmollie_client.set_access_token(\"access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ\")\n\nmollie_client.profiles.delete(\"pfl_QkEhN94Ba\")", "install": "pip install mollie-api-python" }, { "language": "ruby", "code": "require 'mollie-api-ruby'\n\nMollie::Client.configure do |config|\n config.api_key = 'access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ'\nend\n\nMollie::Profile.delete('pfl_QkEhN94Ba')", "install": "gem install mollie-api-ruby" } ] } } } }, "components": { "securitySchemes": { "apiKey": { "type": "http", "scheme": "bearer", "x-default": "live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" }, "organizationAccessToken": { "type": "http", "scheme": "bearer", "x-default": "access_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" }, "oAuth": { "type": "oauth2", "flows": { "authorizationCode": { "authorizationUrl": "https://my.mollie.com/oauth2/authorize", "tokenUrl": "https://api.mollie.com/oauth2/tokens", "scopes": {} } } } } }, "x-readme": { "explorer-enabled": false, "samples-languages": [ "shell", "php", "node", "python", "ruby" ] } } ```