Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Create Record with Foreign Key - API c#

Topic Labels: API
1204 1
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi chaps,

I’m using the API to add a new record to a table and getting stuck with a Foreign Key (Integer). I am using C# and the AirtableAPIClient Nuget Package.

This is where the code is tripping up:

            fields.AddField("Username", username);
            fields.AddField("Password", password);
            fields.AddField("Ref", Refs );

AirTable is returning a 422 error on the Refs field. The foreign key is a single link, not multiple. The column itself is a LongInt. I’ve tried adding an array, a single value, but not having any luck with this. Can someone please advise?

Thanks

1 Reply 1

Fixed, I needed to activate typecast and send the value over as a string instead of integer