Contents
On this page

Save Credits - Plugixa Stream

PUT /plugixa-stream/v1/admin/series/{id}/credits

Replace a title’s whole cast and crew. A line can name an existing person by id, or a new name, which creates the person or reuses one already called that.

Needs a user with the plugixa_stream_edit capability (signed in with an Application Password or the login cookie). Administrators hold it; other roles only when you grant it.

Request

PUT https://your-site.example/wp-json/plugixa-stream/v1/admin/series/2814/credits

Path parameters

Name Type Description
id integer The title’s id

Request body

Content type: application/json

Field Type Required Description
credits object[] Yes The lines, in order, at most 60. [] removes them all.
credits[].person integer No An existing person. Lines naming one that does not exist are skipped.
credits[].name string No A name, used when person is 0 or missing.
credits[].role string No actor (the default), director, creator, writer or producer. Other roles are skipped.
credits[].character string No Actors only, up to 120 characters.

The same person in the same role twice is kept once.

{
  "credits": [
    {
      "person": 214,
      "role": "actor",
      "character": "Flash Gordon"
    },
    {
      "name": "Frederick Stephani",
      "role": "director"
    }
  ]
}

Responses

200 OK. data is the credits as stored.

{
  "success": true,
  "data": [
    {
      "id": 214,
      "name": "Buster Crabbe",
      "photo": "https://your-site.example/wp-content/uploads/2026/10/buster-crabbe-150x150.jpg",
      "role": "actor",
      "character": "Flash Gordon"
    },
    {
      "id": 215,
      "name": "Frederick Stephani",
      "photo": "",
      "role": "director",
      "character": ""
    }
  ]
}
Field Type Meaning
data[].id integer The person
data[].name string Their name
data[].photo string Photo, thumbnail size, or empty
data[].role string actor, director, creator, writer or producer
data[].character string The part played; actors only

Errors

Status Code When
401 / 403 plugixa_stream_forbidden The caller lacks the capability.
404 plugixa_stream_not_found No title with that id.
422 plugixa_stream_invalid credits is not a list.

Plus the errors every endpoint can return.

Examples

curl -s -X PUT "https://your-site.example/wp-json/plugixa-stream/v1/admin/series/2814/credits" \
  -u "$WP_USER:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"credits":[{"person":214,"role":"actor","character":"Flash Gordon"},{"name":"Frederick Stephani","role":"director"}]}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-stream/v1/admin/series/2814/credits');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
    CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode([
        'credits' => [
            [
                'person'    => 214,
                'role'      => 'actor',
                'character' => 'Flash Gordon',
            ],
            [
                'name' => 'Frederick Stephani',
                'role' => 'director',
            ],
        ],
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-stream/v1/admin/series/2814/credits', {
  method: 'PUT',
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ credits: [{ person: 214, role: 'actor', character: 'Flash Gordon' }, { name: 'Frederick Stephani', role: 'director' }] }),
});
const { data } = await response.json();

Quick Links

Share