NAV
shell ruby python csharp php

Citizenship

The Citizenship object

The Citizenship object looks like this in JSON:

{
    "object": "citizenship",
    "id": 6,
    "person_id": 1,
    "country": "US",
    "country_abbrv": "US",
    "country_name": "United States of America",
    "added_at": null,
    "added_by_id": null,
    "sandbox": true
}
Attribute Required Data Type
id Yes int
person_id Yes int
country Yes char
country_abbrv No text
country_name No text
added_at No datetime
added_by_id No int
sandbox No bool

index

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/people/(person)/citizenships" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X GET
require 'httparty'
response = HTTParty.get(
 'https://yourschool.populiweb.com/api2/people/(person)/citizenships',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.get(
 'https://yourschool.populiweb.com/api2/people/(person)/citizenships',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/people/(person)/citizenships"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/people/(person)/citizenships');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "list",
    "count": 1,
    "results": 1,
    "results_per_page": null,
    "pages": 1,
    "page": 1,
    "offset": 0,
    "has_more": false,
    "data": [
        {
            "object": "citizenship",
            "id": 7,
            "person_id": 12,
            "country": "US",
            "country_abbrv": "US",
            "country_name": "United States of America",
            "added_at": null,
            "added_by_id": null
        }
    ],
    "sandbox": true
}

Retrieves all Citizenship objects tied to a specific Person.

HTTP Request

GET /people/(person)/citizenships

Parameters

None

Permissions

One of the following roles is required to call this method:

create

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/people/(person)/citizenships" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X POST
-d '{
    "country": "US",
    "resident_alien": "1"
}' \ 
require 'httparty'
response = HTTParty.post(
 'https://yourschool.populiweb.com/api2/people/(person)/citizenships',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
 body: {
  :country => 'US'
 }.to_json
)
puts response.body
import requests
response = requests.post(
 'https://yourschool.populiweb.com/api2/people/(person)/citizenships',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
 json={
  'country': 'US'
 }
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/people/(person)/citizenships"), Method.Post);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
request.AddJsonBody(new {
  country = "US"
});
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/people/(person)/citizenships');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode([
  'country' => 'US'
]));
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "list",
    "count": 1,
    "results": 1,
    "results_per_page": null,
    "pages": 1,
    "page": 1,
    "offset": 0,
    "has_more": false,
    "data": [
        {
            "object": "citizenship",
            "id": 7,
            "person_id": 12,
            "country": "US",
            "country_abbrv": "US",
            "country_name": "United States of America",
            "added_at": null,
            "added_by_id": null
        }
    ],
    "sandbox": true
}

Creates a new Citizenship object.

HTTP Request

POST /people/(person)/citizenships

Parameters

Name Required Data Type Description
country Yes char
resident_alien No bool

Permissions

One of the following roles is required to call this method:

delete

Example code to call this method:

curl "https://yourschool.populiweb.com/api2/people/(person)/citizenships" \
-H "Content-Type: application/json" \ 
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \ 
-X DELETE
require 'httparty'
response = HTTParty.delete(
 'https://yourschool.populiweb.com/api2/people/(person)/citizenships',
 headers: {
  'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
 },
)
puts response.body
import requests
response = requests.delete(
 'https://yourschool.populiweb.com/api2/people/(person)/citizenships',
 headers={
  'Authorization': 'Bearer YOUR_POPULI_API_KEY'
 },
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/people/(person)/citizenships"), Method.Delete);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/people/(person)/citizenships');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);

Example response:

{
    "object": "person",
    "id": 12,
    "first_name": "Taylor",
    "last_name": "Forest",
    "middle_name": null,
    "prefix": "Mrs.",
    "suffix": null,
    "preferred_name": null,
    "display_name": "Taylor Forest",
    "salutation": "Mrs. Alice Admin",
    "addressee": "Mrs. Alice Admin",
    "gender": "female",
    "other_gender": null,
    "image_file_id": null,
    "birth_date": null,
    "status": "active",
    "social_security_number": null,
    "alien_registration_number": null,
    "social_insurance_number": null,
    "home_city": null,
    "home_state": null,
    "home_country": null,
    "former_name": null,
    "license_plate": null,
    "bio": null,
    "hispanic_latino": false,
    "resident_alien": false,
    "localization_id": null,
    "notification_email_id": null,
    "deceased_date": null,
    "import_id": null,
    "staff_id": null,
    "faculty_id": null,
    "degree_level_id": null,
    "added_at": null,
    "added_by_id": null,
    "updated_at": "2026-07-25T16:24:14+00:00",
    "private_profile": false,
    "is_user": true,
    "sandbox": true
}

Removes all citizenship data about a person.

HTTP Request

DELETE /people/(person)/citizenships

Parameters

No additional parameters are needed beyond the ID of the object to delete that appears in the URL.

Permissions

One of the following roles is required to call this method: