Python
from openlayer import Openlayer
client = Openlayer()
client.workspaces.api_keys.delete(
"3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b",
workspace_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)import Openlayer from 'openlayer';
const client = new Openlayer();
await client.workspaces.apiKeys.delete('3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b', {
workspaceId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
});
package main
import (
"context"
"github.com/openlayer-ai/openlayer-go"
)
client := openlayer.NewClient()
err := client.Workspaces.APIKeys.Delete(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b",
)
if err != nil {
panic(err.Error())
}
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.models.workspaces.apikeys.ApiKeyDeleteParams;
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
ApiKeyDeleteParams params = ApiKeyDeleteParams.builder()
.workspaceId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.apiKeyId("3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b")
.build();
client.workspaces().apiKeys().delete(params);
require "openlayer"
openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])
openlayer.workspaces.api_keys.delete(
"3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b",
workspace_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
)
curl --request DELETE \
--url https://api.openlayer.com/v1/workspaces/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/api-keys/3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b \
--header 'Authorization: Bearer <token>'
Invites and API keys
Delete API key
Delete an API key.
Python
from openlayer import Openlayer
client = Openlayer()
client.workspaces.api_keys.delete(
"3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b",
workspace_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)import Openlayer from 'openlayer';
const client = new Openlayer();
await client.workspaces.apiKeys.delete('3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b', {
workspaceId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
});
package main
import (
"context"
"github.com/openlayer-ai/openlayer-go"
)
client := openlayer.NewClient()
err := client.Workspaces.APIKeys.Delete(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b",
)
if err != nil {
panic(err.Error())
}
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.models.workspaces.apikeys.ApiKeyDeleteParams;
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
ApiKeyDeleteParams params = ApiKeyDeleteParams.builder()
.workspaceId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.apiKeyId("3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b")
.build();
client.workspaces().apiKeys().delete(params);
require "openlayer"
openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])
openlayer.workspaces.api_keys.delete(
"3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b",
workspace_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
)
curl --request DELETE \
--url https://api.openlayer.com/v1/workspaces/182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e/api-keys/3f2b9c1e-8a4d-4e6f-9b7a-1c2d3e4f5a6b \
--header 'Authorization: Bearer <token>'
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your workspace API key. See Find your API key for more information.
Path Parameters
The workspace id.
The API key id.
Response
200
Key deleted. All of its secrets stop working immediately, including a previous secret still in its rotation grace period.
Was this page helpful?