/v1/me/society-memberships/{role}
const url = 'https://api.emely.io/v1/me/society-memberships/songwriter';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '[{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","agencyCode":"example","memberNumber":"example","ipn":"example","isPrimary":true,"rights":["example"],"names":[{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","name":"example","ipiCae":"example","kind":"example","labelCode":"example"}],"territories":[{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","tisCode":1,"inclusionExclusion":"example","seq":1}],"rightTerritories":[{"rightType":"example","territories":[{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","tisCode":1,"inclusionExclusion":"example","seq":1}]}]}]'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.emely.io/v1/me/society-memberships/songwriter \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '[ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "agencyCode": "example", "memberNumber": "example", "ipn": "example", "isPrimary": true, "rights": [ "example" ], "names": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "ipiCae": "example", "kind": "example", "labelCode": "example" } ], "territories": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "tisCode": 1, "inclusionExclusion": "example", "seq": 1 } ], "rightTerritories": [ { "rightType": "example", "territories": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "tisCode": 1, "inclusionExclusion": "example", "seq": 1 } ] } ] } ]'Replace the caller’s memberships for one role via the setSocietyMemberships Action. The owner is resolved server-side: songwriter/performer write the caller’s own person, publisher/label the caller’s workspace (pass workspaceId when a member of more than one). Send the full list: ids keep existing rows, absent rows are removed. Absence rule per field: omitted = untouched, null clears where allowed, [] clears a list. Membership identifiers are write-only input; the party IP Base Number is managed on the person or home publisher in the app. An imported or verified membership IPN is locked: a changed or cleared value, or removal of its membership, returns 409, and a correction must be reported in the app for operator review. Requires an api_user token.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
object
object
Examplegenerated
[ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "agencyCode": "example", "memberNumber": "example", "ipn": "example", "isPrimary": true, "rights": [ "example" ], "names": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "ipiCae": "example", "kind": "example", "labelCode": "example" } ], "territories": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "tisCode": 1, "inclusionExclusion": "example", "seq": 1 } ], "rightTerritories": [ { "rightType": "example", "territories": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "tisCode": 1, "inclusionExclusion": "example", "seq": 1 } ] } ] }]Responses
Section titled “ Responses ”The role’s memberships after the write
object
object
object
object
object
object
object
Example
{ "items": [ { "role": "songwriter", "owner": { "type": "person" } } ]}Invalid input, or an ambiguous/misused workspaceId
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}Missing or invalid bearer token
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}Token role refused for this route, or no write access to the workspace
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}No resolvable owner (no person or no workspace)
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}A locked membership identifier must be reported for review
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}Upstream error
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}