Skip to content

Audiences ​

A saved audience is a fixed set of Digital Twins. Ask it with target.audienceId on Ask questions and you reach the same people every time, faster than a described audience.

List audiences ​

GET/v1/audiences

Lists your organisation's saved audiences.

Returns ​

audiencesarray

Your saved audiences.

bash
curl https://api.originalvoices.ai/v1/audiences \
  -H "Authorization: Bearer $ORIGINALVOICES_API_KEY"
ts
const res = await fetch("https://api.originalvoices.ai/v1/audiences", {
  headers: { Authorization: `Bearer ${process.env.ORIGINALVOICES_API_KEY}` },
});
const { data } = await res.json();
python
res = requests.get(
    "https://api.originalvoices.ai/v1/audiences",
    headers={"Authorization": f"Bearer {os.environ['ORIGINALVOICES_API_KEY']}"},
)
json
{
  "requestId": "9a0d…",
  "data": {
    "audiences": [
      {
        "id": "3f6c2a1e-…",
        "title": "US remote tech",
        "prompt": "US, 25-45, tech professionals working remotely"
      }
    ]
  },
  "error": null
}

Create an audience ​

POST/v1/audiences

Saves an audience from a description. The Twins that match are fixed at this moment, so later asks reach the same people.

Body ​

titlestringrequired

A name for the audience. Must be unique in your organisation.

promptstringrequired

Who's in it, in plain words, e.g. "US, 25-45, tech professionals working remotely".

Returns ​

The new audience's id and title.

bash
curl https://api.originalvoices.ai/v1/audiences \
  -H "Authorization: Bearer $ORIGINALVOICES_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "US remote tech",
    "prompt": "US, 25-45, tech professionals working remotely"
  }'
ts
const res = await fetch("https://api.originalvoices.ai/v1/audiences", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.ORIGINALVOICES_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    title: "US remote tech",
    prompt: "US, 25-45, tech professionals working remotely",
  }),
});
python
res = requests.post(
    "https://api.originalvoices.ai/v1/audiences",
    headers={"Authorization": f"Bearer {os.environ['ORIGINALVOICES_API_KEY']}"},
    json={
        "title": "US remote tech",
        "prompt": "US, 25-45, tech professionals working remotely",
    },
)
json
{
  "requestId": "c41b…",
  "data": { "id": "3f6c2a1e-…", "title": "US remote tech" },
  "error": null
}

Rename an audience ​

PATCH/v1/audiences/{id}

Changes an audience's title. Its Twins stay the same.

Body ​

titlestringrequired

The new name.

Returns ​

The audience's id and new title.

bash
curl -X PATCH https://api.originalvoices.ai/v1/audiences/3f6c2a1e-… \
  -H "Authorization: Bearer $ORIGINALVOICES_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "title": "US remote tech workers" }'
ts
await fetch(`https://api.originalvoices.ai/v1/audiences/${id}`, {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.ORIGINALVOICES_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ title: "US remote tech workers" }),
});
python
requests.patch(
    f"https://api.originalvoices.ai/v1/audiences/{id}",
    headers={"Authorization": f"Bearer {os.environ['ORIGINALVOICES_API_KEY']}"},
    json={"title": "US remote tech workers"},
)
json
{
  "requestId": "e2a7…",
  "data": { "id": "3f6c2a1e-…", "title": "US remote tech workers" },
  "error": null
}

Delete an audience ​

DELETE/v1/audiences/{id}

Deletes a saved audience. This can't be undone.

Returns ​

success: true once it's deleted.

bash
curl -X DELETE https://api.originalvoices.ai/v1/audiences/3f6c2a1e-… \
  -H "Authorization: Bearer $ORIGINALVOICES_API_KEY"
ts
await fetch(`https://api.originalvoices.ai/v1/audiences/${id}`, {
  method: "DELETE",
  headers: { Authorization: `Bearer ${process.env.ORIGINALVOICES_API_KEY}` },
});
python
requests.delete(
    f"https://api.originalvoices.ai/v1/audiences/{id}",
    headers={"Authorization": f"Bearer {os.environ['ORIGINALVOICES_API_KEY']}"},
)
json
{
  "requestId": "07bd…",
  "data": { "success": true },
  "error": null
}