REST V2 CreateUpdateContactRequest property leadsource_id="GRELBER" is illegal

“{“code”:400,“message”:“For input string: "GRELBER"”,“status”:“Bad Request”,“details”:[{“domain”:“contact”,“resource”:“POST /rest/v2/contacts”}]}”
Perhaps I’m misunderstanding the “string” type associated with this property. Any suggestions?
The error message is only partially useless. The only way I found the errant property is via the value in the error message.

It must be the id of a valid (existing) lead source.

I wondered about that. That would be integer datatype, not string? Fortunately, I’ve extended my leadsource cache to include the id, I just have to map it.
I love all the edge cases in transforming data to match this API
I also forgot to mention that this means another loss of functionality: no more lead sources generated by this tool. I’m not handling creating leadsources on the fly. I’m sure that was a problem with the Legacy API.

Todd is correct.

The API expects the ID of an existing lead source, not a text value like "GRELBER". You’ll just need to map the lead source name to its existing ID before sending the request.

Reference: Keap REST API V2

@OmarAlmonte Thanks. You probably didn’t see my edit to my response to @Todd_Stoker .
The documentation you link refers to leadsource_id as “string” not existing id.

Also, I note the mismatch between Company, which merits model, but leadsource only gets a mistyped id. Orthogonality: what a concept

@Jeffrey_Chimene You’re right, thanks for pointing that out. I’ll note this so we can correct it in the docs.