Makes the account and pod on the first sign-in.
POST
/api/v1/accounts
const url = 'https://app.jadwigo.pl/api/v1/accounts';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"language":"pl"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.jadwigo.pl/api/v1/accounts \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "language": "pl" }'Idempotent per signed-in user: a second call makes nothing and returns the same reply.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
language
required
string
Responses
Section titled “Responses”Created.
Media typeapplication/json
object
account
required
member
required
pod
required
learners
required
Array<object>
object
learner
required
object
id
required
string
pod_id
required
string
handle
required
string
first_name
required
string
age_group
required
string | null
created_at
required
string format: date-time
goals
required
Array<object>
object
id
required
string
pod_id
required
string
learner_id
required
string
name
required
string
created_at
required
string format: date-time
Example
{ "member": { "role": "parent" }, "pod": { "language": "pl" }}An error: {error: {type, message}}. The type names the cause, and answers with one status:
- 400:
BadRequest,ServerFieldSupplied - 401:
NotSignedIn,Unauthorized - 404:
NotFound - 409:
AccountMissing,AttemptClaimed,AttemptPreview,AssignmentClosed,AttemptFinished,AttemptNotFinished,AttemptPaused,QuestionNotOpen,TryOutOfOrder,AnswerConflict,EventIdMismatch,WriteOnce - 429:
AnswerLimit - 502:
BankUnavailable
Media typeapplication/json
object
error
required
object
type
required
string
message
required
string
Example
{ "error": { "type": "BadRequest" }}An error: {error: {type, message}}. The type names the cause, and answers with one status:
- 400:
BadRequest,ServerFieldSupplied - 401:
NotSignedIn,Unauthorized - 404:
NotFound - 409:
AccountMissing,AttemptClaimed,AttemptPreview,AssignmentClosed,AttemptFinished,AttemptNotFinished,AttemptPaused,QuestionNotOpen,TryOutOfOrder,AnswerConflict,EventIdMismatch,WriteOnce - 429:
AnswerLimit - 502:
BankUnavailable
Media typeapplication/json
object
error
required
object
type
required
string
message
required
string
Example
{ "error": { "type": "BadRequest" }}An error: {error: {type, message}}. The type names the cause, and answers with one status:
- 400:
BadRequest,ServerFieldSupplied - 401:
NotSignedIn,Unauthorized - 404:
NotFound - 409:
AccountMissing,AttemptClaimed,AttemptPreview,AssignmentClosed,AttemptFinished,AttemptNotFinished,AttemptPaused,QuestionNotOpen,TryOutOfOrder,AnswerConflict,EventIdMismatch,WriteOnce - 429:
AnswerLimit - 502:
BankUnavailable
Media typeapplication/json
object
error
required
object
type
required
string
message
required
string
Example
{ "error": { "type": "BadRequest" }}