{"_id":"579f35461e46ad2000b724fd","__v":1,"parentDoc":null,"project":"56e29a8dd3b68d0e00b48ffa","githubsync":"","category":{"_id":"579b22d3f4ad7b190094b60e","project":"56e29a8dd3b68d0e00b48ffa","__v":0,"version":"56e29a8dd3b68d0e00b48ffd","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-07-29T09:33:07.078Z","from_sync":false,"order":1,"slug":"accounts","title":"Accounts"},"user":"5795d43eb9ee2d0e00df357a","version":{"_id":"56e29a8dd3b68d0e00b48ffd","hasReference":true,"project":"56e29a8dd3b68d0e00b48ffa","__v":15,"hasDoc":true,"createdAt":"2016-03-11T10:14:37.460Z","releaseDate":"2016-03-11T10:14:37.460Z","categories":["56e29a8ed3b68d0e00b48ffe","56eb917a2e58011700afdfcc","56eb92252109011700f3ba5e","5704d4af849f721900f27835","57052a31473f900e004d5d54","5715222811537f19006aab2d","5715b57b810df00e00cc7832","5715baa9810df00e00cc7837","57180ed83a17770e009a7322","571810273a17770e009a7325","579b22d3f4ad7b190094b60e","584538ecba4f1c0f0096925e","586bb88e5602870f00ae7177","5a70407fb0a01400369583c5","5ace359e40606a0003eac1de"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-08-01T11:40:54.145Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"<?php\n// Examples assumes Composer is in use with GuzzleHttp as the API library.\nrequire_once(\"vendor/autoload.php\");\nuse GuzzleHttp\\Client;\n\n// Production environment endpoint\n// $api_base_uri = 'https://api.single-invoice.co/v2.0';\n\n// Sandbox environment endpoint\n$api_base_uri = 'https://api-demo.single-invoice.co/v2.0';\n\n// Create a client and provide a base URL\n$client = new Client(\n\t[ \n\t\t'timeout' \t=> 4.0,\n\t\t'verify'\t=> true,\n\t\t'debug'\t\t=> true\n\t]\n);\n\ntry \n{\n\t$response = $client->request('DELETE', $api_base_uri.\"/Account/Key/Mi1PnUbJbtpo4ThKv67AhNihkvNK39FtchJrsCOyYk7CWQYnhirvSIdv6M2Vhor3\", [\n\t\t'headers' => [ 'apikey' => 'wFrRGRmdNz2Gax4GidpDLXmwwLVnyI5mWEBD7V50b30vnY7DkOhDoLVEq4eMtHla' ],\n\t]);\n\n\t// Check the status code returned by the call\n\t$statusCode = $response->getStatusCode();\n\n\t// Get the data\n\t$data = json_decode($response->getBody(), true);\n}\ncatch (GuzzleHttp\\Exception\\ClientException $e) {\n\t$response = $e->getResponse();\n\t$responseBodyAsString = $response->getBody()->getContents();\n}","language":"php"}]},"method":"delete","results":{"codes":[{"status":200,"name":"","code":"{\n    \"Id\": 471,\n    \"Email\": \"test:::at:::example.com\",\n    \"Packages\": {\n        \"Account\": [\n            \"MmozazEzajJrMmozMmtqZGRkIiwibmFtZSI6IkpvaG4gRG9lIiwiY1fac1X4\"\n        ]\n    },\n    \"FirstName\": \"Test\",\n    \"LastName\": \"Example\",\n    \"Company\": \"Example.com\",\n    \"Phone\": \"+44-7500-000-000\",\n    \"Address\": \"123 Test St, London\",\n    \"SIREN\": null,\n    \"Roles\": \"User\",\n    \"Active\": true\n}","language":"json"}]},"settings":"","auth":"required","params":[{"_id":"579f35461e46ad2000b724ff","ref":"","in":"header","required":true,"desc":"Your Application API Key, in the HTTP request headers.","default":"","type":"string","name":"apikey"},{"_id":"579f35461e46ad2000b724fe","ref":"","in":"path","required":true,"desc":"The API key to delete.","default":"","type":"string","name":"id"}],"url":"/account/key/:id"},"isReference":true,"order":5,"body":"This method allows you to remove an assigned API key from your account. \n\nNote that any code running that is using a deleted API key will fail as it will no longer be authorised for use.","excerpt":"Deletes an API key from your account.","slug":"delete-api-key","type":"endpoint","title":"Delete API Key"}

deleteDelete API Key

Deletes an API key from your account.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

id:
required
string
The API key to delete.

Headers

apikey:
required
string
Your Application API Key, in the HTTP request headers.

Examples


Result Format


Documentation

This method allows you to remove an assigned API key from your account. Note that any code running that is using a deleted API key will fail as it will no longer be authorised for use.