API Documentation

API Endpoint

Team Memberships

Team Memberships

Supported filter params

  • id

  • person_id

  • team_id

Supported filter params

  • person_name
GET /api/v2/team_memberships
Requestsreturns team_memberships

GET  /api/v2/team_memberships

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "1",
      "type": "team_memberships",
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": "2039"
          }
        },
        "person": {
          "meta": {
            "included": false
          }
        },
        "team": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "2",
      "type": "team_memberships",
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": "2039"
          }
        },
        "person": {
          "meta": {
            "included": false
          }
        },
        "team": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "3",
      "type": "team_memberships",
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": "2039"
          }
        },
        "person": {
          "meta": {
            "included": false
          }
        },
        "team": {
          "meta": {
            "included": false
          }
        }
      }
    }
  ],
  "links": {
    "first": "http://api-test.productive.io/api/v2/team_memberships?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://api-test.productive.io/api/v2/team_memberships?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 3,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get team memberships
GET/api/v2/team_memberships


GET /api/v2/team_memberships/1
Requestsreturns team_membership

GET  /api/v2/team_memberships/4

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "4",
    "type": "team_memberships",
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "2040"
        }
      },
      "person": {
        "meta": {
          "included": false
        }
      },
      "team": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Gets a team membership
GET/api/v2/team_memberships/{id}

URI Parameters
HideShow
id
number (required) Example: 1

team membership id


POST /api/v2/team_memberships
Requestscreates team_membershipreturns error

POST  /api/v2/team_memberships

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "team_memberships",
    "attributes": {
      "person_id": "8124",
      "team_id": "7"
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "6",
    "type": "team_memberships",
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "2041"
        }
      },
      "person": {
        "meta": {
          "included": false
        }
      },
      "team": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

POST  /api/v2/team_memberships

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "type": "team_memberships",
  "attributes": {
    "team_id": ""
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/person"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/team"
      }
    }
  ]
}

Create a team membership
POST/api/v2/team_memberships

URI Parameters
HideShow
person_id
number (required) Example: 1

person id

team_id
number (required) Example: 1

team id


DELETE /api/v2/team_memberships/1
Requestssoft deletes the team_membership

DELETE  /api/v2/team_memberships/8

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a team membership
DELETE/api/v2/team_memberships/{id}

URI Parameters
HideShow
id
number (required) Example: 1

team membership id


Generated by aglio on 02 Aug 2025