Skip to main content

Get all API keys

GET 

https://api.publicsquare.com/api-keys

Get a list of API keys for the Account.

Permissions

  • api-key:read

Request

Query Parameters

    type string[]

    List of API key types to filter by

    page int32

    Possible values: > 0 and <= 2147483647

    Page

    size int32

    Possible values: > 0 and <= 100

    Page size

Responses

OK

Schema
    pagination object
    total_itemsint32nullable

    Total number of records

    Example: 1020
    page_numberint32nullable

    Current page number

    Example: 23
    page_sizeint32

    Page size

    Example: 20
    total_pagesint32nullable

    Total number of pages

    Example: 51
    data object[]nullable

    Possible values: <= 100

  • Array [
  • idstringnullable

    API key ID

    Example: key_7Ay5mcUXAxwrN6wQEQUVEHBCJ
    account_idstringnullable

    Account ID

    Example: acc_B518niGwGYKzig6vtrRVZGGGV
    environmentstringnullable

    Environment - Can be test or production

    Example: production
    keystringnullable

    API key for performing API requests

    Example: pk_prod_6fpAaGyHBeGNpxTpJKMD5w5wk
    typestringnullable

    API key type - Can be publishable, secret or restricted

    Example: publishable
    created_atdate-timenullable

    Date API key was created

    Example: 2024-06-30T01:02:29.212Z
    modified_atdate-timenullable

    Date API key was modified

    Example: 2024-06-30T01:02:29.212Z
    namestringrequired

    Name of the API key

    Possible values: non-empty and <= 100 characters

    Example: Test Application
    permissionsstring[]required

    List of permissions to assign to the API key

    Possible values: >= 1

    Example: ["api-key:write","business:read","business:writer"]
  • ]

Authorization: X-API-KEY

name: X-API-KEYtype: apiKeyscopes: api-key:readdescription: Authorization by API Key inside request's X-API-KEY headerin: header
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.publicsquare.com/api-keys");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("X-API-KEY", "<X-API-KEY>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://api.publicsquare.com
Auth
Parameters
— query
— query
— query
ResponseClear

Click the Send API Request button above and see the response here!