FlaresendDocs
Audiences

Update an audience

Rename an audience.

PATCH/v1/audiences/{id}API key

The name is the only thing you can change on an audience. To change who is in it, use Add contacts and Remove contacts.

Path parameters

idstringpathrequired

The audience ID.

Body parameters

namestringrequired

The new name, 1 to 200 characters. Must be unique in the project.

Response

The renamed audience, with the fields described in Create an audience.

Errors

StatusCodeWhen
400invalid_bodyname is missing, empty or over 200 characters.
404audience_not_foundNo audience with that ID in this project.

Renaming to a name another audience already has is not turned into a clean 409 audience_exists the way Create an audience is. The database refuses it and the request fails with 500 internal_error. Pick a name that isn't taken.